<?php
/*
Template Name: Sitemap Page
*/
?>
<?php get_header() ?>
	
	<div id="container">
		<div id="content" class="hfeed">

<?php the_post() ?>

			<div id="post-<?php the_ID() ?>" class="<?php plaintxtblog_post_class() ?>">
				<h2 class="entry-title"><?php the_title() ?></h2>
				<div class="entry-content">
<?php the_content(); ?>

					<ul id="sitemap-page" class="xoxo">
						<li id="all-pages">
							<h3><?php _e( 'All Pages', 'plaintxtblog' ) ?></h3>
							<ul>
<?php wp_list_pages('title_li='); ?>
							</ul>
						</li>
						<li id="all-posts">
							<h3><?php _e( 'All Posts', 'plaintxtblog' ) ?></h3>
							<ul>
<?php $post_archives = new wp_query('showposts=1000'); 
while ( $post_archives->have_posts() ) : $post_archives->the_post(); ?>
								<li class="hentry">
									<span class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__( 'Permalink to %s', 'plaintxtblog' ), wp_specialchars( get_the_title(), 1 ) ) ?>" rel="bookmark"><?php the_title(); ?></a></span>
								</li>
	<!--Add By Kenny BOF-->
	<h2><?php the_title(); ?></h2>	
	
	<p><strong><a href="<?php bloginfo('url'); ?>" alt="<?php bloginfo('name'); ?>">Home</a></strong></p>
	<h3>All internal pages:</h3>
	<ul>
		<?php wp_list_pages('title_li='); ?>
	</ul>
	<h3>All internal blog posts:</h3>
	<ul>
		<?php $archive_query = new WP_Query('showposts=1000');
			while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
		<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <strong><?php comments_number('0', '1', '%'); ?></strong></li>
		<?php endwhile; ?>
	</ul>
	<h3>Monthly archive pages:</h3>
	<ul>
		<?php wp_get_archives('type=monthly'); ?>
	</ul>
	<h3>Topical archive pages:</h3>
	<ul>
		<?php wp_list_categories('title_li=0'); ?>
	</ul>
	<h3>Available RSS Feeds:</h3>
	<ul>
		<li><a href="<?php bloginfo('rdf_url'); ?>" alt="RDF/RSS 1.0 feed"><acronym title="Resource Description Framework">RDF</acronym>/<acronym title="Really Simple Syndication">RSS</acronym> 1.0 feed</a></li>
		<li><a href="<?php bloginfo('rss_url'); ?>" alt="RSS 0.92 feed"><acronym title="Really Simple Syndication">RSS</acronym> 0.92 feed</a></li>
		<li><a href="<?php bloginfo('rss2_url'); ?>" alt="RSS 2.0 feed"><acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed</a></li>
		<li><a href="<?php bloginfo('atom_url'); ?>" alt="Atom feed">Atom feed</a></li>
	</ul>

<div class="clear rule"></div><!--Add By Kenny EOF-->
<?php endwhile; ?>
							</ul>
						</li>
						<li id="monthly-archives">
							<h3><?php _e( 'All Monthly Archives', 'plaintxtblog' ) ?></h3>
							<ul>
<?php wp_get_archives('type=monthly&show_post_count=1') ?>
							</ul>
						</li>
						<li id="category-archives">
							<h3><?php _e( 'All Category Archives', 'plaintxtblog' ) ?></h3>
							<ul>
<?php wp_list_categories('optioncount=1&title_li=&show_count=1') ?> 
							</ul>
						</li>
						<li>
							<h3><?php _e('Archives by Tag', 'plaintxtblog') ?></h3>
							<p><?php wp_tag_cloud() ?></p>
						</li>
					</ul>

<?php link_pages('<div class="page-link">'.__('Pages: ', 'plaintxtblog'), '</div>', 'number'); ?>

<?php edit_post_link(__('Edit this entry.', 'barthelme'),'<p class="entry-edit">','</p>') ?>

				</div>
			</div><!-- .post -->

<?php if ( get_post_custom_values('comments') ) comments_template() // Add a key/value of "comments" to load comments on a page ?>

		</div><!-- #content .hfeed -->
	</div><!-- #container -->

<?php get_sidebar() ?>
<?php get_footer() ?>